package com.entity;

import lombok.Data;

import java.util.Date;

/**
 * @Author:Domen
 * @Date:2024/5/23 16:45
 */
@Data
public class AppointEntity {

    private long bookId;// 图书ID

    private long studentId;// 学号

    private Date appointTime;// 预约时间

    // 多对一的复合属性
    private BookEntity book;// 图书实体

    public AppointEntity() {
    }

    public AppointEntity(long bookId, long studentId, Date appointTime) {
        this.bookId = bookId;
        this.studentId = studentId;
        this.appointTime = appointTime;
    }

    public AppointEntity(long bookId, long studentId, Date appointTime, BookEntity book) {
        this.bookId = bookId;
        this.studentId = studentId;
        this.appointTime = appointTime;
        this.book = book;
    }

    @Override
    public String toString() {
        return "Appointment [bookId=" + bookId + ", studentId=" + studentId + ", appointTime=" + appointTime + "]";
    }

}
